package com.chess.connections.work;

/**
 * Created by wusk on 2017/12/15.
 * 异步任务
 */
public class Task implements Runnable {

    private ITaskHandler handler;
    private Object data;

    public Task(ITaskHandler h, Object o){
        handler = h;
        data = o;
    }

    @Override
    public void run() {
        handler.handle(data);
    }
}
